home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
win
/
general
/
wsheap.exe
/
EXMSCHP.CPP
< prev
next >
Wrap
Text File
|
1993-01-27
|
769b
|
31 lines
//EXMSCHP.CPP
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <iostream.h>
#include <memory.h>
#include <windows.h>
#include <wsheap.h>
#if defined (STRICT)
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
#else
int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int cmdShow) {
#endif
LPVOID P1, P2;
THeapState HS;
SaveHeapState(&HS, sfMSC);
P1 = _fmalloc(800);
P2 = _fmalloc(100);
//...
_ffree(P1);
CompareHeapState(&HS, "EXMSCHP.DMP", "MSC Test (changes expected)");
_ffree(P2);
CompareHeapState(&HS, "EXMSCHP.DMP", "MSC Test (all disposed)");
DoneHeapState(&HS);
return 0;
}